﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类tModule
	/// </summary>
	[Serializable]
	public class tModule : Entity 
	{ 
		 public tModule() 
            : base("tModule") 
        { 

        }


		#region Model
		private int _ModuleID;
		private string _ModuleGUID;
		private string _ModuleName;
		private string _ModuleHint;
		private bool _ShowInTree;
		private string _ShortCut;
		private int? _ImageIndex;
		private int? _HelpContext;
		private int _ParentID;
		private string _ModuleClass;
		private string _ModuleStyle;
		private string _ModuleVerbs;
		private string _ModuleContext;
		private string _MenuName;
		private string _MenuVerb;
		private string _MenuParam;
		private int? _MenuLevel;
		private int? _MenuOrder;
		private bool _NoAccessControl;
		private bool _IsPublish;
		private string _FormName;
	 
		/// <summary>
		/// 
		/// </summary>
		public int ModuleID
		{
			get{ return _ModuleID; }
			set
			{
				this.OnPropertyValueChange(_.ModuleID,_ModuleID,value);
				this._ModuleID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleGUID
		{
			get{ return _ModuleGUID; }
			set
			{
				this.OnPropertyValueChange(_.ModuleGUID,_ModuleGUID,value);
				this._ModuleGUID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleName
		{
			get{ return _ModuleName; }
			set
			{
				this.OnPropertyValueChange(_.ModuleName,_ModuleName,value);
				this._ModuleName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleHint
		{
			get{ return _ModuleHint; }
			set
			{
				this.OnPropertyValueChange(_.ModuleHint,_ModuleHint,value);
				this._ModuleHint = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool ShowInTree
		{
			get{ return _ShowInTree; }
			set
			{
				this.OnPropertyValueChange(_.ShowInTree,_ShowInTree,value);
				this._ShowInTree = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ShortCut
		{
			get{ return _ShortCut; }
			set
			{
				this.OnPropertyValueChange(_.ShortCut,_ShortCut,value);
				this._ShortCut = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? ImageIndex
		{
			get{ return _ImageIndex; }
			set
			{
				this.OnPropertyValueChange(_.ImageIndex,_ImageIndex,value);
				this._ImageIndex = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? HelpContext
		{
			get{ return _HelpContext; }
			set
			{
				this.OnPropertyValueChange(_.HelpContext,_HelpContext,value);
				this._HelpContext = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int ParentID
		{
			get{ return _ParentID; }
			set
			{
				this.OnPropertyValueChange(_.ParentID,_ParentID,value);
				this._ParentID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleClass
		{
			get{ return _ModuleClass; }
			set
			{
				this.OnPropertyValueChange(_.ModuleClass,_ModuleClass,value);
				this._ModuleClass = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleStyle
		{
			get{ return _ModuleStyle; }
			set
			{
				this.OnPropertyValueChange(_.ModuleStyle,_ModuleStyle,value);
				this._ModuleStyle = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleVerbs
		{
			get{ return _ModuleVerbs; }
			set
			{
				this.OnPropertyValueChange(_.ModuleVerbs,_ModuleVerbs,value);
				this._ModuleVerbs = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleContext
		{
			get{ return _ModuleContext; }
			set
			{
				this.OnPropertyValueChange(_.ModuleContext,_ModuleContext,value);
				this._ModuleContext = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MenuName
		{
			get{ return _MenuName; }
			set
			{
				this.OnPropertyValueChange(_.MenuName,_MenuName,value);
				this._MenuName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MenuVerb
		{
			get{ return _MenuVerb; }
			set
			{
				this.OnPropertyValueChange(_.MenuVerb,_MenuVerb,value);
				this._MenuVerb = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MenuParam
		{
			get{ return _MenuParam; }
			set
			{
				this.OnPropertyValueChange(_.MenuParam,_MenuParam,value);
				this._MenuParam = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? MenuLevel
		{
			get{ return _MenuLevel; }
			set
			{
				this.OnPropertyValueChange(_.MenuLevel,_MenuLevel,value);
				this._MenuLevel = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? MenuOrder
		{
			get{ return _MenuOrder; }
			set
			{
				this.OnPropertyValueChange(_.MenuOrder,_MenuOrder,value);
				this._MenuOrder = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool NoAccessControl
		{
			get{ return _NoAccessControl; }
			set
			{
				this.OnPropertyValueChange(_.NoAccessControl,_NoAccessControl,value);
				this._NoAccessControl = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool IsPublish
		{
			get{ return _IsPublish; }
			set
			{
				this.OnPropertyValueChange(_.IsPublish,_IsPublish,value);
				this._IsPublish = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FormName
		{
			get{ return _FormName; }
			set
			{
				this.OnPropertyValueChange(_.FormName,_FormName,value);
				this._FormName = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.ModuleID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.ModuleID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.ModuleID,
				_.ModuleGUID,
				_.ModuleName,
				_.ModuleHint,
				_.ShowInTree,
				_.ShortCut,
				_.ImageIndex,
				_.HelpContext,
				_.ParentID,
				_.ModuleClass,
				_.ModuleStyle,
				_.ModuleVerbs,
				_.ModuleContext,
				_.MenuName,
				_.MenuVerb,
				_.MenuParam,
				_.MenuLevel,
				_.MenuOrder,
				_.NoAccessControl,
				_.IsPublish,
				_.FormName
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_ModuleID,
				_ModuleGUID,
				_ModuleName,
				_ModuleHint,
				_ShowInTree,
				_ShortCut,
				_ImageIndex,
				_HelpContext,
				_ParentID,
				_ModuleClass,
				_ModuleStyle,
				_ModuleVerbs,
				_ModuleContext,
				_MenuName,
				_MenuVerb,
				_MenuParam,
				_MenuLevel,
				_MenuOrder,
				_NoAccessControl,
				_IsPublish,
				_FormName
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "ModuleID":
                    this._ModuleID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ModuleGUID":
                    this._ModuleGUID = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleName":
                    this._ModuleName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleHint":
                    this._ModuleHint = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ShowInTree":
                    this._ShowInTree = DataHelper.ConvertValue<bool>(value);
                    break; 
				case "ShortCut":
                    this._ShortCut = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ImageIndex":
                    this._ImageIndex = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "HelpContext":
                    this._HelpContext = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ParentID":
                    this._ParentID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ModuleClass":
                    this._ModuleClass = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleStyle":
                    this._ModuleStyle = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleVerbs":
                    this._ModuleVerbs = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleContext":
                    this._ModuleContext = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MenuName":
                    this._MenuName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MenuVerb":
                    this._MenuVerb = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MenuParam":
                    this._MenuParam = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MenuLevel":
                    this._MenuLevel = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "MenuOrder":
                    this._MenuOrder = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "NoAccessControl":
                    this._NoAccessControl = DataHelper.ConvertValue<bool>(value);
                    break; 
				case "IsPublish":
                    this._IsPublish = DataHelper.ConvertValue<bool>(value);
                    break; 
				case "FormName":
                    this._FormName = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "ModuleID":
                    return this._ModuleID; 
				case "ModuleGUID":
                    return this._ModuleGUID; 
				case "ModuleName":
                    return this._ModuleName; 
				case "ModuleHint":
                    return this._ModuleHint; 
				case "ShowInTree":
                    return this._ShowInTree; 
				case "ShortCut":
                    return this._ShortCut; 
				case "ImageIndex":
                    return this._ImageIndex; 
				case "HelpContext":
                    return this._HelpContext; 
				case "ParentID":
                    return this._ParentID; 
				case "ModuleClass":
                    return this._ModuleClass; 
				case "ModuleStyle":
                    return this._ModuleStyle; 
				case "ModuleVerbs":
                    return this._ModuleVerbs; 
				case "ModuleContext":
                    return this._ModuleContext; 
				case "MenuName":
                    return this._MenuName; 
				case "MenuVerb":
                    return this._MenuVerb; 
				case "MenuParam":
                    return this._MenuParam; 
				case "MenuLevel":
                    return this._MenuLevel; 
				case "MenuOrder":
                    return this._MenuOrder; 
				case "NoAccessControl":
                    return this._NoAccessControl; 
				case "IsPublish":
                    return this._IsPublish; 
				case "FormName":
                    return this._FormName; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","tModule");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleID = new Field("ModuleID","tModule","ModuleID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleGUID = new Field("ModuleGUID","tModule","ModuleGUID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleName = new Field("ModuleName","tModule","ModuleName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleHint = new Field("ModuleHint","tModule","ModuleHint");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ShowInTree = new Field("ShowInTree","tModule","ShowInTree");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ShortCut = new Field("ShortCut","tModule","ShortCut");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ImageIndex = new Field("ImageIndex","tModule","ImageIndex");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field HelpContext = new Field("HelpContext","tModule","HelpContext");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ParentID = new Field("ParentID","tModule","ParentID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleClass = new Field("ModuleClass","tModule","ModuleClass");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleStyle = new Field("ModuleStyle","tModule","ModuleStyle");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleVerbs = new Field("ModuleVerbs","tModule","ModuleVerbs");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleContext = new Field("ModuleContext","tModule","ModuleContext");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MenuName = new Field("MenuName","tModule","MenuName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MenuVerb = new Field("MenuVerb","tModule","MenuVerb");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MenuParam = new Field("MenuParam","tModule","MenuParam");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MenuLevel = new Field("MenuLevel","tModule","MenuLevel");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MenuOrder = new Field("MenuOrder","tModule","MenuOrder");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field NoAccessControl = new Field("NoAccessControl","tModule","NoAccessControl");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsPublish = new Field("IsPublish","tModule","IsPublish");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FormName = new Field("FormName","tModule","FormName");
		}
		#endregion

 
	}
}

